home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 3 / CD ACTUAL 3.iso / linux / docs / linux-do / network- / nag-1.002 / nag-1 / SOURCE < prev    next >
Encoding:
Text File  |  1994-08-17  |  10.3 KB  |  331 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.          Building the Linux Network Administrators Guide
  9.  
  10.                             Olaf Kirch
  11.  
  12.  
  13.  
  14.  
  15.    1.  Introduction
  16.  
  17.    The  Network  Administrators' Guide (NAG) allows you to pro-
  18.    duce a couple of different  output  formats  from  the  same
  19.    source.  Currently,  the  main  supported  targets  are DVI,
  20.    PostScript(TM), and GNU roff (using the mm  macro  package).
  21.    You can select these different formats by invoking the Make-
  22.    file with the appropriate target name.
  23.  
  24.    The NAG is intended to compile on as many TeX  platforms  as
  25.    possible.   To fine-tune its behavior, you have to adapt the
  26.    main configuration file, Config.tex.  The  options  you  can
  27.    set in this file are described below.
  28.  
  29.    As  I'm not a LaTeX guru, and as there are quite a number of
  30.    different LaTeX version around, compiling the NAG  may  fail
  31.    on your system.  If this happens to you, I'd be glad to hear
  32.    from you if and how you solved your problems,  and  incorpo-
  33.    rate your fixes in a future release.
  34.  
  35.  
  36.  
  37.    2.  Different output formats
  38.  
  39.    The  NAG  can be compiled for three different output formats
  40.    at the moment. These are
  41.  
  42.    DVI
  43.       DVI is the generic LaTeX output format.  This  should  be
  44.       relatively  painless  on  virtually  all  systems. But it
  45.       isn't always, which is one of the reasons this  installa-
  46.       tion guide is so long.
  47.  
  48.       To produce the DVI output, simply go to the source direc-
  49.       tory and type
  50.  
  51.             make dvi
  52.  
  53.       This should produce the file nag.dvi as output.
  54.  
  55.       There's a minor caveat here: The NAG contains a couple of
  56.       figures that were produced with the xfig drawing program,
  57.       and converted to eepic for inclusion with  the  NAG.  You
  58.       have  to have a working epic.sty and eepic.sty macro file
  59.       for this. The source for the NAG contains these files  in
  60.       the  styles/latex  directory.  If these fail to work with
  61.       your TeX installation, but you have  a  working  pair  of
  62.  
  63.  
  64.                                - 1 -
  65.  
  66.  
  67.  
  68.  
  69.  
  70.    Networking Guide 1.0                            Source Notes
  71.  
  72.  
  73.  
  74.       style  files  installed  on  your system, you may want to
  75.       remove the included eepic style files.  You can also find
  76.       a set of eepic style files in the transfig package.
  77.  
  78.       To  print the DVI version, you will need a printer driver
  79.       that understands the \special  instrutions  generated  by
  80.       the eepic package. The drivers from Nelson Beebe's driver
  81.       package should do. The latest version of dvieps I've seen
  82.       (0.6)  didn't have support for these \specials. If you do
  83.       use dvieps, you might want to print the document with it,
  84.       and  produce the pictures separately. One possible way to
  85.       do this is to take the EPSF versions of  them  and  print
  86.       them with ghostscript.
  87.  
  88.    PostScript
  89.       To  generate PostScript output, the Makefile first builds
  90.       a DVI version of the NAG, and converts it  to  PostScript
  91.       afterwards  using  Tom  Rokicki's dvips program. You will
  92.       want to use dvips; I tried dvitops, but  it  didn't  work
  93.       out  for  me.  You  should  also  use a recent version of
  94.       dvips, a version prior to 5.512 I had didn't  work  right
  95.       for me.
  96.  
  97.       The  DVI  version generated for PostScript output is dif-
  98.       ferent from the version built  when  doing  ordinary  DVI
  99.       output,  as  it  uses  the  EPSF versions of the pictures
  100.       instead.  The EPSF versions look  much  better  than  the
  101.       eepic versions.
  102.  
  103.       Normally,   when  converting  DVI  to  PostScript,  dvips
  104.       includes font images of all fonts used in the DVI file in
  105.       the resulting PS file. This greatly increases the size of
  106.       the resulting output file, and makes it dependent on  the
  107.       resolution  of  the output device (300dpi by default). If
  108.       you have a printer capable of PostScript, you may  choose
  109.       to  have  the  output  file use the real PostScript fonts
  110.       instead of the cmr fonts. The exact requirements for this
  111.       are discussed in a later paragraph.
  112.  
  113.       To  build  the  PostScript  version, you go to the source
  114.       directory and type the following command:
  115.  
  116.             make ps
  117.  
  118.       This should produce the file nag.ps as output.
  119.  
  120.    GNU roff
  121.       This output format isn't exactly the greatest thing since
  122.       sliced bread, but it's included for the sake of those who
  123.       don't have the disk space for a  full  TeX  installation,
  124.       and  don't  have  access to PostScript laser printers. It
  125.       allows you to produce an ASCII-only  output  of  the  NAG
  126.       that  doesn't look too bad. However, there are no figures
  127.       in the roff version. Anyone with a faible for ASCII  arts
  128.  
  129.  
  130.                                - 2 -
  131.  
  132.  
  133.  
  134.  
  135.  
  136.    Networking Guide 1.0                            Source Notes
  137.  
  138.  
  139.  
  140.       is  invited to try his or her hand on this. I will gladly
  141.       include the results in a future release.
  142.  
  143.       The TeX source has been converted to GNU roff  using  the
  144.       lotex utility I wrote. The output uses the GNU version of
  145.       the mm macro set. To format the roff source, you have  to
  146.       have groff version 1.08 or later. To create the roff out-
  147.       put and format it, go to the source directory and type:
  148.  
  149.             make mm
  150.             groff -t -mgm -Tlatin1 nag.mm | less
  151.  
  152.       There is also a Makefile target that generates an `ASCII'
  153.       version;  this  is  basically  the formatted roff version
  154.       piped through colcrt to get  rid  of  all  the  character
  155.       sequences  used for highlighting and such. Note that some
  156.       printers, like the HP  Deskjet,  will  happily  grok  the
  157.       backspacing sequences generated by groff and produce real
  158.       underlining and boldface text.
  159.  
  160.  
  161.    3.  The Config.tex file
  162.  
  163.    The Config.tex allows you to set a couple  of  options  that
  164.    fine-tune the compilation of the NAG.  You set these options
  165.    by defining special LaTeX macros like \footrue,  which  sets
  166.    the foo option, or \foofalse, which unsets it.
  167.  
  168.    At  the moment, the following are valid options (showing the
  169.    default settings):
  170.  
  171.    \latexetrue
  172.       If you run LaTeX2e, you must set  this  option  to  true.
  173.       Otherwise,  latex  will  choke horribly when compilig the
  174.       NAG. (Thanks go to Peter  Williams  for  adapting  linux-
  175.       doc.sty for LaTeX2e).
  176.  
  177.       Be  warned  that setting this option may not be enough to
  178.       make the NAG compile cleanly on your  LaTeX  setup.   The
  179.       dreary details are discussed in a separate section below.
  180.  
  181.    \ltxbeta
  182.       This is yet another option dealing with  LaTeX2e.   There
  183.       are  points in which the latest release of LaTeX2e appar-
  184.       ently  differs  from  the  Beta  version  that  has  been
  185.       included  in  Slackware for quite some time. The \ltxbeta
  186.       switch determines which of these  version  the  NAG  will
  187.       attempt to take care of.
  188.  
  189.    \veryoldtexfalse
  190.       If  you run a very old LaTeX installation, you should set
  191.       this to true. It disables  a  macro  (\namedlabel)  which
  192.       latex  refused to grok on an installation I once tried it
  193.       on.  I'm not really familiar with LaTeX version  numbers,
  194.  
  195.  
  196.                                - 3 -
  197.  
  198.  
  199.  
  200.  
  201.  
  202.    Networking Guide 1.0                            Source Notes
  203.  
  204.  
  205.  
  206.       but  I  guess  anything prior to 1992 qualifies as old in
  207.       this context.
  208.  
  209.    \squeezefale
  210.       Setting this option to true will reduce the size  of  the
  211.       output  file from about 350 pages to 250 pages. The docu-
  212.       ment's appearance will suffer a bit, but it saves you ink
  213.       and paper.
  214.  
  215.    \psfontsfalse
  216.       This  option tells latex whether to use PostScript or cmr
  217.       font metrics whene generating  the  DVI  output  for  the
  218.       PostScript  version.  This option has no effect when com-
  219.       piling the NAG for DVI-only output. Again,  setting  this
  220.       option may not be the only thing you have to do to get PS
  221.       fonts. Please stay tuned...
  222.  
  223.  
  224.    4.  Building the NAG with LaTeX2e
  225.  
  226.    There are a couple of things you should check before you can
  227.    latex the Networking Guide with LaTeX2e:
  228.  
  229.       + In  some  versions  of LaTeX2e, report.cls (and several
  230.         other cls files) have a bug in the  definition  of  the
  231.         makeindex option. There's a line that reads
  232.  
  233.           \newcommand\see##1##2{...
  234.  
  235.         This should actually read
  236.  
  237.           \def\see##1##2{...
  238.         Note that this problem is likely to be gone in the lat-
  239.         est version of LaTeX2e.
  240.  
  241.       + If latex complains about  not  finding  the  ifthen.sty
  242.         package,     you     have     to     go     to     your
  243.         /usr/TeX/lib/texmf/tex/latex2e directory, and  run  the
  244.         following command:
  245.  
  246.          latex l2eextra.ins
  247.  
  248.         This  unpacks  a  couple  of extra packages, among them
  249.         ifthen.sty.  The script asks you a couple of  questions
  250.         about fonts, which you can answer with yes (these ques-
  251.         tions apply to a couple of other packages, like  cyril-
  252.         lic fonts, which the NAG doesn't use:-)
  253.  
  254.       + To  use  PostScript fonts with LaTeX2e, you may have to
  255.         unpack yet another package.  If building the NAG  fails
  256.         with  error  messages about not finding psfonts.sty, or
  257.         not finding fonts like OT1pcr, then you have to  go  to
  258.         the /usr/TeX/lib/texmf/tex/nfss2 directory and execute
  259.  
  260.  
  261.  
  262.                                - 4 -
  263.  
  264.  
  265.  
  266.  
  267.  
  268.    Networking Guide 1.0                            Source Notes
  269.  
  270.  
  271.  
  272.          latex psfonts.ins
  273.    As a conclusion, let me vent my personal opinion on LaTeX2e.
  274.    Although the discussion above may give  you  the  impression
  275.    that  LaTeX2e  is a load of crap and utterly broken, this is
  276.    not true. After coming to terms with some of  the  new  fea-
  277.    tures, I was very pleased how well-behaved it is.  The prob-
  278.    lems I've encountered (and which you  will  prossibly  face,
  279.    too)  actually  seem  to be problems of Slackware. Slackware
  280.    used to come with a Beta-testing version,  which,  in  addi-
  281.    tion,  didn't  have  all  crucial  files unpacked. I haven't
  282.    checked Slackware 2.0, though, so your mileage may vary.
  283.  
  284.  
  285.    5.  PostScript Fonts with LaTeX 2.09 or earlier
  286.  
  287.    To use Postscript fonts with  LaTeX  version  2.09  or  even
  288.    older,  you  have  to  have two macro files from the psfonts
  289.    package, being psfonts.sty and times.sty.  If you don't have
  290.    them,  get  them from the latest release of Thomas Rokicki's
  291.    dvips package.
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.                                - 5 -
  329.  
  330.  
  331.